import {reactive} from "vue";

export default function usePosition() {
    const position = reactive({
        x: 0,
        y: 0
    })
    document.addEventListener("mousemove", (event) => {
        position.x = event.pageX
        position.y = event.pageY
    })
    return {
        position
    }
}